<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Demo_mysql extends CI_Controller
{

	public function __construct()
	{
		parent::__construct();
		$this->load->helper('url');
	}

	public function index()
	{
		if ($this->input->is_ajax_request()) {
			ob_start();
			var_dump($this->input->input_stream('data'));
			$return = json_encode(array('error' => 0, 'msg' => ob_get_contents()));
			ob_clean();
			echo $return;
		} else {
			$this->load->view('demo/mysql/index');
		}
	}

}